﻿#ifndef DIALOG_H
#define DIALOG_H

#include <QDialog>
#include "dxl360comm.h"

#include <QDateTime>
#include <QTimer>
namespace Ui {
class Dialog;
}

class Dialog : public QDialog
{
    Q_OBJECT

public:
    explicit Dialog(QWidget *parent = 0);
    ~Dialog();
private slots:
    void on_button();

    void on_updateData1(double x, double y);
    void on_updateData2(double x, double y);
    void on_updateData3(double x, double y);
    void on_updateData4(double x, double y);
    void on_updateData5(double x, double y);
    void on_timer();
    void on_log();
private:
    void startMonitor();
    void stopMonitor();
    void initPort();
    Ui::Dialog *ui;
    DXL360Comm m_dp1;
    DXL360Comm m_dp2;
    DXL360Comm m_dp3;
    DXL360Comm m_dp4;
    DXL360Comm m_dp5;

    QDateTime m_time[5];

    double m_valueX[5];
    double m_valueY[5];
    QTimer m_timer;
    QTimer m_timerLog;
};

#endif // DIALOG_H
